//
//  DCMyProductionHistoryCell.m
//  HNBaseProject
//
//  Created by xujie on 2024/8/27.
//

#import "DCMyProductionHistoryCell.h"

@implementation DCMyProductionHistoryCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self createUI];
    }
    return self;
}

- (void)createUI {
    
    self.bgV = [[UIView alloc] init];
    self.bgV.layer.cornerRadius = 4;
    self.bgV.layer.masksToBounds = YES;
    [self.contentView addSubview:self.bgV];
    [self.bgV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.top.offset(0);
    }];
    
    self.topV = [[UIImageView alloc] init];
    self.topV.contentMode = UIViewContentModeScaleAspectFill;
    self.topV.clipsToBounds = YES;
    [self.bgV addSubview:self.topV];
    
    self.bottomV = [[UIImageView alloc] init];
    self.bottomV.contentMode = UIViewContentModeScaleAspectFill;
    self.bottomV.clipsToBounds = YES;
    [self.bgV addSubview:self.bottomV];
    
    [self.topV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.offset(0);
        make.height.mas_equalTo(122);
    }];
    
    [self.bottomV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.offset(0);
        make.height.mas_equalTo(122);
    }];
}

- (void)realodCellWithModel:(AIMyHistoryCreateModel *)model {
    [self.topV sd_setImageWithURL:[NSURL URLWithString:model.image_url]];
    [self.bottomV sd_setImageWithURL:[NSURL URLWithString:model.image_url]];
}

@end
